package com.yds.ydsdatasetbackend.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yds.ydsdatasetbackend.model.dto.patient.PatientAddRequest;
import com.yds.ydsdatasetbackend.model.dto.patient.PatientQueryRequest;
import com.yds.ydsdatasetbackend.model.dto.patient.PatientUpdateRequest;
import com.yds.ydsdatasetbackend.model.entity.File;
import com.yds.ydsdatasetbackend.model.entity.Patient;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yds.ydsdatasetbackend.model.entity.User;
import com.yds.ydsdatasetbackend.model.vo.PatientVO;

import javax.servlet.http.HttpServletRequest;

/**
* @author YDS
* @description 针对表【patient(病人表)】的数据库操作Service
* @createDate 2025-04-09 15:02:16
*/
public interface PatientService extends IService<Patient> {

    /**
     * 添加病人信息
     * @param patientAddRequest
     * @param request
     * @return
     */
    PatientVO addPatient(PatientAddRequest patientAddRequest, HttpServletRequest request);

    PatientVO getPatientVO(Patient patient, HttpServletRequest request);

    Page<PatientVO> getPatientVOPage(Page<Patient> patientPage, HttpServletRequest request);

    QueryWrapper<Patient> getQueryWrapper(PatientQueryRequest patientQueryRequest);


    void updatePatient(PatientUpdateRequest patientUpdateRequest, User loginUser);

    void checkPatientAuth(User loginUser, Patient patient);
}
